package com.bootdo;
import com.alibaba.dubbo.spring.boot.annotation.EnableDubboConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
/*import org.springframework.cloud.netflix.hystrix.EnableHystrix;*/
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableAutoConfiguration(exclude = {
        org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
})
@EnableTransactionManagement(order=10)
@ServletComponentScan
@MapperScan("com.bootdo.*.dao")
@ComponentScan(basePackages={"com.bootdo.*","com.front.*"})
@SpringBootApplication
@EnableCaching
@EnableScheduling
//开启dubbo
//@EnableDubboConfiguration
//开启springCloud熔断
//@EnableHystrix
/*public class BootdoApplication {
    public static void main(String[] args) {
        SpringApplication.run(BootdoApplication.class, args);
        System.out.println("ヾ(◍°∇°◍)ﾉﾞ 启动成功    ");      
    }

}*/


/**
 * war包启动需要*/
public class BootdoApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(BootdoApplication.class, args);          
        System.out.println("ヾ(◍°∇°◍)ﾉﾞ    启动成功      ヾ(◍°∇°◍)ﾉﾞ");
    }
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
    	return application.sources(BootdoApplication.class);
    }
}

